﻿@namespace MudBlazor.Docs.Examples



<MudGrid>
    <MudItem xs="12" sm="12" md="12">
        <MudTextField @ref="multilineReference" T="string" Label="Multiline Select" Lines="3" Variant="Variant.Text" Text="@sampleText" />
    </MudItem>
    <MudItem xs="12" Class="d-flex justify-end">
        <MudButton @onclick="() => multilineReference.SelectAsync()">
            Select
        </MudButton>
    </MudItem>
    <MudItem xs="12">
        <MudTextField @ref="singleLineReference" T="string" Label="Single Select" Variant="Variant.Filled" Text="@sampleText" />
    </MudItem>
    <MudItem xs="12" Class="d-flex justify-end">
        <MudButton @onclick="() => singleLineReference.SelectAsync()">
            Select
        </MudButton>
    </MudItem>
</MudGrid>

@code
{
    private MudTextField<string> multilineReference;
    private MudTextField<string> singleLineReference;

    string sampleText = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.";
}